<?php
/**
 * 用户积分操作类
 */
class User_Point{
	function __construct(){
		
	}
	function getUserPoint($openid){//查询用户的积分、元宝数
		$sql = 'select point,gold from userinfo where qq_openid="'.$openid.'"';
		$db = DB_Sqlite2::initialize();
		$ret = $db->array_query($sql);
		$return = array();
		$return['point']=$ret[0]['point']?$ret[0]['point']:0;
		$return['gold']=$ret[0]['gold']?$ret[0]['gold']:0;
		unset($ret);
		return $return;
	}
	
}